package com.iflysse.services;

import com.iflysse.pojo.bo.CommonBoResp;
import com.iflysse.pojo.bo.req.*;
import com.iflysse.pojo.bo.resp.*;

import java.sql.SQLException;

public interface TestService {
    /**
     * 根据学生编号获取当前学生的课后作业(测试)
     * @param studentIdBoReq
     * @return
     */
    TeachingActivityListBoResp getTestByStudentId(StudentIdBoReq studentIdBoReq) throws SQLException;

    /**
     * 学生点击某个测试进去的数据业务     上方信息
     * 根据学生学号和测试编号,查询测试详情
     * @param studentIdAndTaskIdBoReq
     * @return
     */
    StudentTestStateBoResp getStudentTestAndStateByTestIdAndStudentId(StudentIdAndTaskIdBoReq studentIdAndTaskIdBoReq) throws SQLException;

    /**
     * 当前学生测试答题页面下面的每次测试记录      下方的测试记录列表
     * @param studentIdAndTaskIdBoReq
     * @return
     */
    StudentAnswerListBoResp getStudentAnswerListByTestIdAndStudentId(StudentIdAndTaskIdBoReq studentIdAndTaskIdBoReq) throws SQLException;

    /**
     * 学生点击开始(继续)答题,进入答题界面
     * 显示标题,答题卡
     * @param studentIdAndTaskIdBoReq
     * @return
     */
    StudentAnswerBoResp startToAnswerByTestIdAndStudentId(StudentIdAndTaskIdBoReq studentIdAndTaskIdBoReq) throws SQLException;


    /**
     * 学生点击选项,实现答题功能
     * @param studentAnswerQuestionBoReq
     * @return
     */
    CommonBoResp answerQuestionByStudentIdAndStudentTestId(StudentAnswerQuestionBoReq studentAnswerQuestionBoReq) throws SQLException;

    /**
     * 学生交卷,改变测试的状态:0,进行中,1,已交卷
     * @param studentTestIdBoReq
     * @return
     */
    CommonBoResp submitTest(StudentTestIdBoReq studentTestIdBoReq) throws SQLException;

    /**
     * 根据学生编号获取该学生的未完成测试
     * @param studentIdBoReq
     * @return
     */
    TestListBoResp getUnfinishedTestByStudentId(StudentIdBoReq studentIdBoReq) throws SQLException;

    /**
     * 根据学生编号获取该学生的未完成测试数量
     * @param studentIdBoReq
     * @return
     */
    UnfinishedTestAmountBoResp getUnfinishedTestAmountByStudentId(StudentIdBoReq studentIdBoReq) throws SQLException;

    /**
     * 获取学生某次测试的结果
     * @param studentTestIdBoReq
     * @return
     */
    StudentTestDetailBoResp getStudentTestDetailByStudentTestId(StudentTestIdBoReq studentTestIdBoReq) throws SQLException;


    /**
     * 根据测试编号获取本次测试的分析数据
     * @param testIdBoReq
     * @return
     */
    StudentTestDetailAnalyseBoResp getStudentTestDetailAnalyseByTestId(TestIdBoReq testIdBoReq) throws SQLException;
}
